* { margin: 0; padding: 0; box-sizing: border-box; }
button { padding: 2px 4px; }

/* 代码区 */
section.code {
    width: 50vw;
}
#html {
    padding: 10px;
    word-break: break-all;
}

/* 太极区 */

section.taiji {
    width: 50vh;
    height: 50vh;
    position: fixed;
    right: 20px;
    top: 20px;
}
#div1 {
    position: absolute;
    left: 0;
    top: 0;
}

#div1::before,
#div1::after {
    content: "";
    display: block;
}

.btnGroup {
    position: fixed;
    right: 20px;
    top: 550px;
}
.btnGroup.disappear {
    animation: btnGroupAni 0.5s linear forwards;
}
@keyframes btnGroupAni {
    0% { display: block; opacity: 1; }
    100% { display: none; opacity: 0; }
}
.btnGroup > button {
    display: block;
    margin: 8px 0;
}

@media (max-width: 500px) {
    html, body {
        height: 100vh;
        overflow: hidden;
    }

    /* 代码区 */
    section.code {
        border: 1px solid gray;
        width: 100vw;
        height: 50vh;
        overflow-y: auto;
    }

    /* 太极区 */
    section.taiji {
        position: fixed;
        right: 50%;
        transform: translateX(50%);
        top: 50vh;
    }

    .btnGroup {
        width: 100vw;
        height: 50vh;
        position: fixed;
        right: 0;
        top: 50vh;
    }
    .btnGroup > button {
        margin: 0;
        position: absolute;
    }
    .btnGroup > button:nth-child(1) { left: 5px; top: 5px; }
    .btnGroup > button:nth-child(2) { right: 5px; top: 5px; }
    .btnGroup > button:nth-child(3) { left: 5px; bottom: 5px; }
    .btnGroup > button:nth-child(4) { right: 5px; bottom: 5px; }
}